import { useAppSelector } from '@/app/hooks'
// import {useSelector} from 'react-redux'
// import type { RootState } from '../../redux/store'
import { selectCount } from './slice'

export default function CounterShow() {
  // 读取redux管理的状态数据
  // 回调中的state是内部管理的总状态数据
  // const count = useSelector((state: RootState) => state.counter.count)
  const count = useAppSelector(selectCount)

  return (
    <h2>点击的次数: {count}</h2>
  )
}
